Managing Disks, Volumes, and Partitions in Windows Server 2008
The
main tool you can use to manage disks, volumes, and partitions in
Windows Server 2008 is Disk Management. With Disk Management, you can
initialize disks, bring disks online or offline, create volumes within
disks, format volumes, change disk partition styles, extend and shrink
volumes, and create fault-tolerant disk sets.
To access Disk Management, you can type Diskmgmt.msc
in the Run box, select Disk Management beneath the Storage node in
Server Manager, or select the Disk Management node in the Computer
Management console (accessible through Administrative Tools).
Disk Management is shown in Figure 5.
Understanding Basic and Dynamic Disks
Disk Management enables you to manage both basic and dynamic disks.
By
default, all disks are basic disks. A basic disk is a physical disk
that contains primary partitions, extended partitions, or logical
drives. The number of partitions you can create on a basic disk depends
on the disk’s partition style.
On disks that use the master boot record (MBR) partition style, you can
create up to four primary partitions per basic disk, or you can create
up to three primary partitions and one extended partition. Within the
one extended partition, you can then create unlimited logical drives.
On basic disks that use the GUID partition table (GPT) partition style,
you can create up to 128 primary partitions. Because GPT disks do not
limit you to four partitions, you do not need to create extended
partitions or logical drives. GPT disks are recommended for disks
larger than 2 terabytes (TB) and for disks on 64-bit systems.
Note: Partition styles
Partition
styles refer to the most elemental disk structure visible to the
operating system. Partition styles do not affect file formats within
partitions such as NTFS or FAT32. Basic and dynamic disks can occur on
either partition style.
Dynamic
disks provide advanced features that basic disks do not, features such
as the ability to create an unlimited number of volumes, volumes that
span multiple disks (spanned and striped volumes), and fault-tolerant
volumes (mirrored and RAID-5 volumes). There are five types of dynamic
volumes: simple, spanned, striped, mirrored, and RAID-5.
In
previous versions of Windows, you needed to convert a basic disk to a
dynamic disk before you could create any of these volume types. When
you use Disk Management in Windows Server 2008 to create any of these
volume types, however, basic disks are automatically converted to
dynamic during the process. As a result, the question of whether a disk
is basic or dynamic has become less important from an administrative
point of view. Despite this development, it is still important to know
for dual-boot configurations that many earlier versions of Windows
(such as Windows NT, Windows 98, and Windows ME) cannot access dynamic
disks. Also relevant for dual-boot configurations is the fact that
dynamic disks are compatible only with Windows operating systems.
Creating Volumes
You can use Disk Management or the Diskpart command-line utility to create the following volume types in Windows Server 2008.
Simple or basic volumes
Simple volumes are basic drives that are not fault tolerant. A simple
volume can consist of a single region on a disk or multiple regions
that are on the same disk and linked together.
To
create a simple volume in Disk Management, right-click unallocated
space on a disk, and then click New Simple Volume, as shown in Figure 6.
(This process is identical whether you are creating the volume on a
basic or dynamic disk, even though on a basic disk, the new volume is
technically called a partition or basic volume.) You might need to
right-click the disk and select Online first.
To
create a simple volume by using the Diskpart utility, use the utility
to select the disk and then, on a dynamic disk, type the command create volume simple. To create a new volume (partition) on a basic disk, type create partition. You can use create volume ? or create partition ? to learn the specific syntax associated with these commands.
Spanned volumes A
spanned volume is a dynamic volume consisting of disk space on more
than one physical disk. If a simple volume is not a system volume or
boot volume, you can extend it across additional disks to create a
spanned volume, or you can create a new volume as a spanned volume by
using unallocated space on more than one disk.
To
create a new spanned volume, in Disk Management, right-click
unallocated space on one of the disks where you want to create the
spanned volume, and then click New Spanned Volume. This step opens the
New Spanned Volume Wizard, in which you can add space to the spanned
volume from the disks available.
Figure 7
shows a spanned volume, assigned drive letter E. Notice how the drive
uses space from Disk 1 and Disk 2 but appears as only a single volume
with a capacity of 7.32 GB.
Striped volumes A
striped volume, which is also known as RAID 0, is a dynamic volume that
stores data in stripes across two or more physical disks. Striped
volumes offer the best performance of all the volumes that are
available in Windows, but they do not provide fault tolerance. If a
disk in a striped volume fails, the data in the entire volume is lost.
Figure 8 shows how data in a striped volume is written across a set of disks.
When
should you use a striped volume? A striped volume is the best storage
solution for temporary data that does not need fault tolerance but does
require high performance. Examples of such temporary data include page
files and Temp folders. To create a new striped volume in Disk
Management, right-click unallocated space on a disk, and then click New
Striped Volume.
A striped volume in Disk Management is shown in Figure 9.
Notice how the volume uses 1.46 GB of space from both Disk 1 and Disk 2
and appears as a single volume E with a total capacity of 2.93 GB. Note
also how the volume is being used to store temporary data (the Page
File).
Note: RAID disks
As with all RAID solutions, a striped volume is built with disks of equal size.
Mirrored volumes
Also known as a RAID 1, a mirrored volume is a fault-tolerant volume
that provides data redundancy by using two copies, or mirrors, of the
same volume. All data written to the mirrored volume is written to both
volumes, which are located on separate physical disks. If one of the
physical disks fails, the data on the failed disk becomes unavailable,
but the system continues to operate using the unaffected disk.
Figure 10 illustrates how data is stored on a mirrored volume. Because data is duplicated, no data is lost if either disk fails.
Note: Triple mirroring and beyond
Although
mirrored volumes configured in Windows Server 2008 are limited to two
disks, mirrors created through third-party solutions can be created out
of three disks or more. In a triple mirror configuration, for example,
the contents of one disk are duplicated on two additional disks.
Multiple mirrors degrade write performance but improve fault tolerance.
They are good solutions for mission-critical data.
As
a fault tolerant solution, a mirrored volume has advantages and
disadvantages. One advantage of a mirrored volume is that it offers
very good read performance as well as fairly good write performance. In
addition, mirroring requires only two disks, and almost any volume can
be mirrored, including the system and boot volumes. The disadvantage of
a mirrored volume is that it requires 50 percent of a disk’s total
storage capacity to be reserved for fault tolerance. Overall, if you
need a fault tolerant storage solution, a mirror is a good choice if
you have only two disks; if you need good read and write performance;
or if you need to provide fault tolerance for the system volume, the
boot volume, or other mission-critical data.
To
create a mirrored volume, you can either add a mirror to an existing
volume or create a new mirrored volume. To add a mirror to an existing
volume in Disk Management, right-click the existing volume, and then
click Add Mirror, as shown in Figure 11.
To
create a new mirrored volume in Disk Management, right-click
unallocated space on a disk, and then click New Mirrored Volume. A new
mirrored volume is shown in Figure 12.
Notice how the drive uses 5.86 GB of space from both Disk 1 and Disk 2
and appears as a single volume E with a total capacity of 5.86 GB.
Raid-5 volumes A
RAID-5 volume is a fault tolerant volume that combines areas of free
space from at least three physical hard disks into one logical volume.
RAID-5 volumes stripe data along with parity
(evenness or oddness) information across a set of disks. When a single
disk fails, Windows Server 2008 uses this parity information to
re-create the data on the failed disk. RAID-5 volumes can accept the
loss of only a single disk in the set.
Figure 13
shows a RAID-5 volume made up of four disks. Data written to the volume
is striped across these disks from left to right. For each stripe
across the set of disks, one disk is used to hold parity information
about the evenness or oddness of the other data in the stripe. In the
simplified example shown in Figure 2-13,
parity is set to 1 when the sum of the values in the stripe is odd, and
parity is set to 0 when the sum of the remaining values is even. Using
this parity information along with other disk data, if any one (and
only one) disk fails, Windows can reconstruct the complete contents of
that failed disk. The data of the failed drive can be re-created in
real time as users request it. The party information can also be
re-created live on a new disk once the failed disk has been replaced.
The
space approximately equivalent of one disk is always used for fault
tolerance in a RAID-5 volume. For example, if you create a RAID-5 out
of four 120-GB disks, the total storage space available in that RAID-5
is 360 GB.
When
should you use a RAID-5 volume? A RAID-5 volume is characterized by
very good read performance, relatively poor write performance, and
optimal use of storage space in a fault tolerant solution. Therefore,
consider using a RAID-5 volume when good write performance is not a
priority or when you need a fault tolerant storage solution that makes
the best use of available storage. Note also that you cannot assign the
system or boot partition to a RAID-5 volume created in Windows Server
2008.
Note: Software and hardware RAIDs
A
RAID-5 volume created in Disk Management is an example of a software
RAID because the RAID is created by the operating system. Some vendors,
however, sell disk enclosures that include their own built-in RAID
setup utility. If you configure a RAID-5 with this vendor software, the
storage appears to Windows Server 2008 as a single local volume. A RAID
configuration such as this, which is transparent to the operating
system, is known as a hardware RAID. Although software RAID has lower
performance than hardware RAID does, software RAID is inexpensive and
easy to configure because it has no special hardware requirements other
than multiple disks. If cost is more important than performance,
software RAID is an appropriate solution.
To
create a RAID-5 volume in Disk Management, right-click unallocated
space on one of the dynamic disks on which you want to create the
RAID-5 volume, and then click New RAID-5 Volume. Then, follow the
instructions in the New RAID-5 Volume Wizard.
To create a RAID-5 volume by using the Diskpart utility, use the command create volume raid. You can use the help create volume raid command to learn the exact syntax.
JC Mackin
Although
you cannot create them in Windows, the RAID levels known as RAID 0+1
and RAID 1+0 are becoming increasingly common in the real world. A RAID
0+1 (or 01) is a mirror of stripes,
essentially twin copies of a striped volume. This type of RAID is
constructed by creating RAID 0 sets and then mirroring them. A RAID 1+0
(or 10), alternatively, is a stripe of mirrors
in which the data is striped across multiple mirrored sets. You
construct this type of RAID by first creating a series of mirror sets
and then building a RAID 0 set across the mirror sets.
Both
of these solutions allocate 50 percent of the disks for fault
tolerance, and both offer excellent read and write performance. RAID
1+0, however, offers a better chance for recoverability if more than
one disk fails.
Note
also that the naming conventions for these two RAID levels are not
firmly established. Some companies (including Microsoft) might refer to
both RAID 01 and 10 generally as 0+1. If you need to clarify your
requirements to vendors, you are better off specifying either a mirror of stripes or a stripe of mirrors.
|
Extending a Volume
You
can add more space to existing simple or spanned volumes by extending
them into unallocated space on the same disk or on a different disk. To
extend a volume, it must either be formatted with the NTFS file system
or unformatted. To extend a volume in Disk Management, right-click the
simple or spanned volume you want to extend, and then click Extend
Volume.
Note: Extending boot and system volumes
You cannot extend a boot or system volume onto another disk.
Shrinking a Volume
You
can decrease the space used by simple or spanned volumes by shrinking
them into contiguous free space at the end of the volume. For example,
if you need to increase the amount of unallocated space on a disk to
make room for a new partition or volume, you can attempt to shrink the
existing volumes on the disk. When you shrink a partition, any ordinary
files are automatically relocated on the disk to create the new
unallocated space. There is no need to reformat the disk to shrink the
partition.
The
amount of space you can gain from shrinking a volume varies greatly. In
general, the greater the percentage of unused space on the volume and
the fewer the bad clusters, the more you will be able to shrink the
volume. If, however, the number of bad clusters detected by dynamic
bad-cluster remapping is too great, you will not be able to shrink the
volume at all. If this occurs, consider moving the data and replacing
the disk.
Caution: Do not shrink raw partitions that contain data
If
a partition is not formatted with a file system but still contains data
(such as a database file), shrinking the partition can actually destroy
the data.
To
shrink a volume in Disk Management, right-click the simple or spanned
volume that you want to shrink, and then click Shrink Volume, as shown
in Figure 14.